#ifndef _ANIMABLE_OBJECT_H_
#define _ANIMABLE_OBJECT_H_

#include "AskalExport.h"
#include "hltypes/hstring.h"
#include "AskalDataCache.h"
#include "Skeleton.h"
#include "AprilMesh.h"
#include "AnimationController.h"


namespace askal
{

	class AskalExport AnimableObject
	{

		AprilMesh *_mMeshPtr;
		Skeleton *_mSkeletonPtr;
		hstr _mTexture;
		AnimationController _mAnimationController;
		bool _mVisible;
		
		harray<April::PlainVertex> _mSkeletonVertexBatch;
		harray<April::PlainVertex> _mMeshVertexBatch;
		
	public:
		AnimableObject();
		AnimableObject(chstr mesh, chstr skeleton, chstr texture);
		~AnimableObject();
		
		void useSkeleton(chstr skeleton);
		void useMesh(chstr mesh);
		void useTexture(chstr texture);
		
		void setVisible(bool visible);
		
		void update(float dt);
		
		AnimationController* getAnimatonController();
		
		const harray<April::PlainVertex>& getMeshVertexBatch() const;
		const harray<April::PlainVertex>& getSkeletonVertexBatch() const;

	};

}

#endif // _ANIMABLE_OBJECT_H_
